#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>


void My_Print(int n)
{
	if (n / 10 == 0)
	{
		printf("%d", n );
		return;
	}
	printf("%d", n % 10);
	My_Print(n / 10);
}

int main()
{
	int num = 0;
	scanf("%d", &num);
	My_Print(num);
	return 0;
}